package com.cet.designpatterns.singleton.type7;

/**
 * @program: algorithm
 * @description: 懒汉式（静态内部类推荐）
 * @author: 陈恩涛
 * @create: 2021-08-30 23:17
 **/
public class SingletonTest {
    public static void main(String[] args) {
        Singleton instance = Singleton.getInstance();
        Singleton instance1 = Singleton.getInstance();
        System.out.println(instance == instance1);
        System.out.println(instance.hashCode());
        System.out.println(instance1.hashCode());
    }
}
